#include <bits/stdc++.h>
using namespace std;
const int maxn=100005;
int bb[maxn];
int maxnn,sum;
int fl=1e5+1;
int n,temp;

int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);


    cin>>n;
    int x;
    for (int i=1;i<=n;i++){
        cin>>x;
        bb[x]+=1;
        maxnn=max(maxnn,x);
        fl=min(fl,x);

    }

    for (int i=fl;i<=maxnn;i++){
        if (bb[i]>0){
            temp=bb[i];
            for (int j=fl;j<i;j++){
                if (bb[j]>0){
                    if (bb[i]>bb[j]){
                        sum+=bb[j];
                        bb[i]-=bb[j];
                        bb[j]=0;

                    }
                    else{
                        sum+=bb[i];
                        bb[i]=0;
                        bb[j]-=bb[i];
                    }

                }
            }
            bb[i]=temp;

        }
    }

    cout<<n-sum;


    return 0;
}
